package com.learn.sc.springbootdemo.pojo;

import com.learn.sc.springbootdemo.aop.DictParam;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
public class Users implements Serializable {
    //人员编号
    String userId;
    //账户
    @NotBlank(message = "账户不能为空")
    @Length(max=10,message="用户账号不超过10位")
    String userAcct;
    //密码
    String userPwd;
    //姓名
    String userName;
    //性别
    @Length(max=1,message = "性别只能为1位")
    @DictParam(dictKey = "SEX")
    String userSex;

    public Users(){}

    public Users(String userName) {
        this.userName = userName;
    }

    public Users(String userAcct, String userPwd) {
        this.userAcct = userAcct;
        this.userPwd = userPwd;
    }



}
